execute as @s[scores={Power=200..}] run return fail
execute if items block ~ ~ ~ container.4 *[custom_data~{id:"battery"},damage=200] run return run function vs:system/game_ctrol/stream_barrier_spawner/power/exhaust_battery

item modify block ~ ~ ~ container.4 {function:"set_damage",damage:-0.009,add:true}
function vs:system/game_ctrol/stream_barrier_spawner/power/add {value:1}

execute if predicate vs:periodic_20tick run playsound minecraft:block.beacon.ambient master @a ~ ~ ~ 0.3 1.0